<template>
	<div>
		<dialog :open="bopen" style="background-color: aqua;">
			{{msg}}
		</dialog>
	</div>
</template>

<script>
	export default {
		data() {
			return {
				
			}
		},
		computed :{
			bopen() {
				if (this.$store.state.erropen == true) {
					//setTimeout()  生效一次
				}
				return this.$store.state.erropen;
			},
			msg() {
				return this.$store.state.errmsg;
			}
		},
		
		mounted() {
			//写定时器去关闭 bopen = false;
			setInterval(()=> {
				this.$store.state.erropen = false;
			}, 3000)
			
		}
	}
</script>

<style>
</style>